package com.mail.server.controller;


import com.mail.model.db.OmsCompanyAddress;
import com.mail.server.common.R;
import com.mail.server.service.OmsCompanyAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 公司收发货地址表 前端控制器
 * </p>
 *
 * @author WJZ
 * @since 2022-06-20
 */
@RestController
@RequestMapping("/companyAddress")
public class OmsCompanyAddressController {

    @Autowired
    private OmsCompanyAddressService companyAddressService;

    /**
     * 获取所有收货地址
     * @return
     */
    @GetMapping("/list")
    public R list() {
        List<OmsCompanyAddress> list = companyAddressService.list();
        return R.success(list);
    }

}
